<?php
/**
 * Created by PhpStorm.
 * User: lili
 * Date: 19-1-21
 * Time: 上午12:58
 */

require "../vendor/autoload.php";
require "../pdo.php";

//redis数据出队操作,从redis中将请求取出
$redis = new Redis();
$redis->connect('127.0.0.1',6379);

while(true){
    try{
        $uid = $redis->lPop('users');
        if(!$uid){
            break;
        }

        /*
         *  利用$uid进行数据库操作
         */

        pdoms($uid);


    }catch(Exception $e){
        echo $e->getMessage();
    }
}